{__NOLAYOUT__}
<!DOCTYPE html>
<html>
<head>
	<meta http-equiv="X-UA-Compatible" content="IE=Edge，chrome=1">
	<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
	<meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=no">
	<title>智能宝转财富宝</title>
	<link rel="stylesheet" href="__CDN__/assets/css/bootstrap.min.css">
    <link rel="stylesheet" type="text/css" href="__CDN__/assets/css/utozizi.css">
    <link rel="stylesheet" href="__CDN__/assets/css/lanrenzhijia.css">
	<script src="__CDN__/assets/libs/jquery/dist/jquery.min.js"></script>
	<script src="__CDN__/assets/libs/bootstrap/dist/js/bootstrap.min.js"></script>
	<script src="__CDN__/assets/js/detail.js"></script>
	<script type="text/javascript">
        var fee = 1-'{$site.score_to_money_fee}'*1;
		$(function(){
         $(".utozizi_allin_soan").click(function(){
               a=$(".utozizi_u_v").text();

               var amount = (a * fee).toFixed(4);

               document.getElementById("utozizi_m").value=a;
               document.getElementById("utozizi_zizi").innerText=amount;              
             });
          })
		 c='';
		 b='';
		 function chadnge(e) {
		 	utozizi_u_v=$(".utozizi_u_v").text();

            var amount = (e * fee).toFixed(4);

		 	if(e!=''&&parseInt(e)<parseInt(utozizi_u_v))
		 	 {
			document.getElementById("utozizi_zizi").innerText=amount;
			 }else{
			 document.getElementById("utozizi_zizi").innerText=0;
			 document.getElementById("utozizi_m").value=0;
			 alert('请输入正确数值');	
			 }
             b=e;
             if(b != ''&& c!='') {
					document.getElementById('submit_btn').style.background="#07D086";
				}else{
					document.getElementById('submit_btn').style.background="#E6E6E6";
				}
			}

			function chadnge2(e){
				c=e;
              if(b != ''&& c!='') {
					document.getElementById('submit_btn').style.background="#07D086";
				}else{
					document.getElementById('submit_btn').style.background="#E6E6E6";
				}
			}
	</script>
</head>
<body>
	<div class="utozizi_heard">
			<div class="utozizi_heard_return">
				<a href="javascript:history.back();"><img src="__CDN__/assets/img/bikebi/return.png"></a>
			</div>
			<div class="utozizi_heard_title">
				<p>智能宝转财富宝</p>
			</div>
	</div>
	<form method="post" action="" onSubmit="return Check_sendbao_form()">
	<div class="utozizi_card"> 
		<div class="utozizi_card_left">
			<p>智能宝</p>
			<input type="text" name="amount" id="utozizi_m" placeholder="输入智能宝数量" onchange="chadnge(this.value);" >
			<p class="utozizi_u"><span class="utozizi_u_v">{$user.score}</span>/智能宝</p>
		</div>
		<div class="utozizi_card_mid">
			 <p>&nbsp;</p>
             <p>➾</p>
             <p>|</p>
        </div>
		<div class="utozizi_card_right">
			<p>财富宝</p>
			<p id="utozizi_zizi">0</p>
			<p>{$user.money}/财富宝</p>
		</div>
	</div> 
     <div class="utozizi_allin"><span class="utozizi_allin_soan">全部转换</span></div>
     <div class="utozizi_img"><img src="__CDN__/assets/img/bikebi/utozizi01.png"><span>验证码</span></div>
     <div class="utozizi_code">
     	<input type="text" name="code" placeholder="请输入验证码" onchange="chadnge2(this.value);">
     	<span>获取验证码</span>
     </div>
     <div class="utozizi_submit">
     	<input type="submit" name="" class="btn btn-defaul" id="submit_btn" value="发送" style="background-color: #07D086;">
     </div>
	</form>
</body>
</html>